fix: handle unparameterized interval_day type#178
Conversation
Allow interval_day to be used without an explicit precision parameter. Signed-off-by: Thomas Gschwind <thg@zurich.ibm.com>
| if parametrized_type.precision is None: | ||
| return Type( | ||
| interval_day=Type.IntervalDay( | ||
| nullability=nullability, | ||
| ) | ||
| ) |
There was a problem hiding this comment.
Do you have a little bit more context on whether this is only an issue for IntervalDay for you and how this is triggered? I'm asking since we have very similar code above for PrecisionTimestampContext and PrecisionTimestampTZContext.
|
Thanks for putting this together, @thgschwind, and apologies for the slow turnaround. Revisiting this in light of the substrait v0.97.0 spec change (July 12): the premise that
Revisiting my earlier question about whether this is IntervalDay-specific — it isn't. Every precision-parameterized type ( Closing without merging, since defaulting to unset precision is now spec-noncompliant. The one real remaining problem — the confusing |
Allow interval_day to be used without an explicit precision parameter.
Fixes: #177